﻿using Domain.Entities;
using Domain.Entities.MentalHealth;
using Domain.Entities.SlimmingAssistants;
using FluentMigrator;
using FrameworkCore.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AiBLSmartEdu.Module.AISlimmingAssistant.API.Migrations;

[Migration(202507030958)]
public class SlimmingAssistantAddColumn : ForwardOnlyMigration
{
    public override void Up()
    {
        Alter.Table(MigrationExpressions.GetTableName(typeof(SlimmingAssistant)))
          .AddColumn(MigrationExpressions.ColumnNameFor<SlimmingAssistant>(nameof(SlimmingAssistant.CustomerId))).AsInt64().Nullable().WithColumnDescription("关联用户ID")
          .AddColumn(MigrationExpressions.ColumnNameFor<SlimmingAssistant>(nameof(SlimmingAssistant.Gender))).AsInt32().Nullable().WithColumnDescription("性别 女：0；男：1")
          .AddColumn(MigrationExpressions.ColumnNameFor<SlimmingAssistant>(nameof(SlimmingAssistant.Age))).AsInt32().Nullable().WithColumnDescription("年龄")
          .AddColumn(MigrationExpressions.ColumnNameFor<SlimmingAssistant>(nameof(SlimmingAssistant.Height))).AsDouble().Nullable().WithColumnDescription("身高（CM）")
          .AddColumn(MigrationExpressions.ColumnNameFor<SlimmingAssistant>(nameof(SlimmingAssistant.Weight))).AsDouble().Nullable().WithColumnDescription("体重（千克）");
    }
}